<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
	<style type="text/css">


	</style>
</head>
<body>
<button onclick="show()">停止</button>
<script type="text/javascript">

var time=setInterval(function(){
	console.log("hello!");
},1000);
function show(){
	clearInterval(time);
}

	alert(x);//function x(){}
    var x = 10;
    alert(x);//10
    x=20;
    function x(){}
    alert(x);//20
    if(true){
       var a = 1;
    }else{
       var b = true;
    }
    alert(a);//1
    alert(b);//undefined

</script>



</body>
</html>